package com.qyer.util.log.test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.qyer.util.log.entity.TrackLog;
import com.qyer.util.log.service.LogService;
import com.qyer.util.log.service.impl.LogServiceImpl;
import com.qyer.util.log.util.LogFatory;

public class test {

	public static String getMatcher(String regex, String source) {  
        String result = "";  
        Pattern pattern = Pattern.compile(regex);  
        Matcher matcher = pattern.matcher(source);  
        while (matcher.find()) {  
            result = matcher.group(1);//只取第一组  
        }  
        return result;  
    } 
	
	public static void main(String[] args) {
		
		String hour = "20160330190102".substring(8,10);
		System.out.println(hour);
	}
}
